<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>{$meta_title}</h2>
    </div>
    <div class="cf">
        <div class="tab-content">
            <!-- 表单 -->
            <form id="form" width="79%" action="{:U('update','','')}" method="post" class="form-horizontal">
                <div class="control-group">
                    <label class="control-label" for="inputName" style="padding-right: 15px;">模版名称 : </label>
                    <div class="controls">
                        <input type="text" id="inputName" name="name" style="width:450px;"  placeholder="输入模版名称标识" value="{$info.name}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="inputDescription" style="padding-right: 15px;">描述 : </label>
                    <div class="controls">
                        <textarea id="inputDescription" name="description" rows="5" style="width:450px;" ><empty name="info.description">输入模版用途描述 <else/>{$info.description}</empty></textarea>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="inputMail_title" style="padding-right: 15px;">邮件标题 : </label>
                    <div class="controls">
                        <input type="text" id="inputMail_title" name="mail_title"  style="width:450px;"  placeholder="输入模版邮件的标题" value="{$info.mail_title}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="inputMail_content" style="padding-right: 15px;">邮件内容 : </label>
                    <div class="controls">
                        <textarea id="inputMail_content" name="mail_content" rows="5" style="width:450px;" ><empty name="info.mail_content">输入模版正文内容 <else/>{$info.mail_content}</empty></textarea>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="inputPreg_content" style="padding-right: 15px;">替换标签 : <small>(每行一个，用冒号分割被替换和替换内容)</small></label>
                    <div class="controls">
                        <textarea id="inputPreg_content" name="preg_content" rows="5" style="width:450px;" >{$info.preg_content}</textarea>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="inputSign_name" style="padding-right: 15px;">邮件签名 : </label>
                    <div class="controls">
                        <textarea id="inputSign_name" name="sign_name" style="width:450px;" >{$info.sign_name}</textarea>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" style="padding-right: 15px;">启用状态 : </label>
                    <div class="controls">
                        <empty name="info.status">
                            <label class="checkbox inline">
                                <input type="checkbox" id="inlineCheckbox1" name="status" value="1" checked> 启用
                            </label>
                            <label class="checkbox inline">
                                <input type="checkbox" id="inlineCheckbox0" name="status" value="0" > 禁用
                            </label>
                            <else />
                            <label class="checkbox inline">
                                <input type="checkbox" id="inlineCheckbox1" name="status" value="1" <eq name="info['status']" value="1">checked</eq> > 启用
                            </label>
                            <label class="checkbox inline">
                                <input type="checkbox" id="inlineCheckbox0" name="status" value="0" <eq name="info['status']" value="0">checked</eq> > 禁用
                            </label>
                        </empty>


                    </div>
                </div>


                <button type="submit" class="btn btn-primary offset2">提交</button>
                <input type="hidden" name="id" value="{$info.id}"/>
                <input type="hidden" name="mail_type" value="1"/>
            </form>
</div>
        </div>

</block>

<block name="script">

    <include file="Public/footjs" />
    </block>
